﻿--[[	$Id: trick.lua 3217 2013-05-06 17:25:31Z sdkyron@gmail.com $	]]

if caelLib.playerClass ~= "ROGUE" then return end

local _, caelAnnounces = ...

caelAnnounces.trick = caelAnnounces.createModule("Trick")

local locale = GetLocale()

local msgChannel = locale == "frFR" and "Ficelles sur " or "Tricks on "

local textColor = {r = 0.84, g = 0.75, b = 0.65}

caelAnnounces.trick:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
caelAnnounces.trick:SetScript("OnEvent", function(_, _, _, subEvent, _, _, sourceName, _, _, _, destName, _, _, spellId, _, _, amount, ...)

	if sourceName and sourceName == UnitName("player") then
		if UnitIsPlayer(destName) and not UnitIsUnit(destName, "pet") then
			if subEvent == "SPELL_CAST_SUCCESS" then
				if  spellId == 57934 then
--					SendChatMessage((msgWhisper), "WHISPER", GetDefaultLanguage("player"), destName)
					RaidNotice_AddMessage(RaidWarningFrame, msgChannel..destName, textColor)

				end
			end
		end
	end
end)